
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets" template="/template/main.xhtml">

	<ui:define name="body">
		<h:form prependId="false">
			<p:toolbar>
				<p:toolbarGroup align="left">
					<p:commandButton value="#{messages['button.save']}" action="#{ambulanciaEditMB.insert}"
						rendered="#{!ambulanciaEditMB.updateMode}" ajax="false" />
					<p:commandButton value="#{messages['button.save']}" action="#{ambulanciaEditMB.update}"
						rendered="#{ambulanciaEditMB.updateMode}" ajax="false" />
					<p:commandButton value="#{messages['button.delete']}" onclick="confirmation.show()"
						rendered="#{ambulanciaEditMB.updateMode}" type="button" immediate="true" ajax="false" />
					<p:confirmDialog message="#{messages['label.confirm.delete']}" showEffect="bounce" hideEffect="explode"
						header="#{messages['label.dialog.delete']}" severity="alert" widgetVar="confirmation">
						<h:commandButton value="#{messages['button.dialog.yes']}" action="#{ambulanciaEditMB.delete}" immediate="true"
							ajax="false" />
						<h:commandButton value="#{messages['button.dialog.no']}" onclick="confirmation.hide()" type="button" />
					</p:confirmDialog>
				</p:toolbarGroup>
			</p:toolbar>

			<br />

			<p:fieldset legend="#{messages['ambulancia.label']}" toggleable="true" toggleSpeed="500">
				<h:panelGrid id="fieldsambulancia" columns="3">
				
					<h:outputLabel value="#{messages['ambulancia.label.id']}: " for="id" styleClass="text-input" />
										
					<h:outputText id="id" value="#{ambulanciaEditMB.bean.id}" />
					
					<p:message for="id" />
						
					<h:outputLabel value="#{messages['ambulancia.label.placa']}: " for="placa" styleClass="text-input" />
					
					<h:inputText id="placa" value="#{ambulanciaEditMB.bean.placa}"
						title="#{messages['ambulancia.alt.placa']}" />
					
					<p:message for="placa" />
						
					<h:outputLabel value="#{messages['ambulancia.label.tipo']}: " for="tipo" styleClass="text-input" />
					
					<p:selectOneMenu id="tipo" effect="fade" value="#{ambulanciaEditMB.bean.tipo}">
						<f:selectItems value="#{ambulanciaEditMB.tipo}" />
					</p:selectOneMenu>					
								
					<p:message for="tipo" />
						
				</h:panelGrid>
			</p:fieldset>
			
		</h:form>
	</ui:define>
</ui:composition>